package util;

import static org.junit.Assert.assertTrue;
import static util.MatrixOperationsF.multiply;
import static util.MatrixOperationsF.print;
import static util.MatrixOperationsF.transp;
import static util.Transformations.generalOrthographicProjection;
import static util.Transformations.transform3DScaling;

import org.junit.Test;

public class _TransformationTest {

	@Test
	public void scaleTest() {
		float[][] point = { { 1, 1, 1, 1 } };
		float[][] trans = transform3DScaling(10, 5, 2);
		float[][] res = { { 10, 5, 2, 1 } };
		assertTrue(MatrixOperationsF.equals(transp(res),
				multiply(trans, transp(point))));

	}

	@Test
	public void test() {
		float[] lbn = { -5, -5, -5, 1 };
		float[] rtf = { 5, 5, 5, 1 };
		float[][] transformation = generalOrthographicProjection(lbn, rtf);
		System.out.println(print(multiply(transformation, rtf)));
	}

}
